const mongoose = require('mongoose');

mongoose.connect("mongodb://127.0.0.1:27017/yang", { useNewUrlParser: true }, (err) => {
    if (err) {
        console.log(err);
        return;
    }
    console.log("mongo连接成功");
});

var Schame = mongoose.Schema;

var ObejectId = Schame.Types.ObjectId;

var NewsCateSchema = new Schame({
    name: String,
    keyword: String
});

module.exports = mongoose.model("NewsCate", NewsCateSchema, "NewsCate");